Add AvdManagerRunner.ListDeviceProfilesAsync() for device profile enumeration#325
Open
Add AvdManagerRunner.ListDeviceProfilesAsync() for device profile enumeration#325
Conversation
…meration Add ListDeviceProfilesAsync() and ParseDeviceListOutput() to AvdManagerRunner. Runs 'avdmanager list device' and parses the output into AvdDeviceProfile records (Id, Name, Oem, Tag). Includes AvdDeviceProfile record model, 6 unit tests, and PublicAPI entries for both net10.0 and netstandard2.0. Closes #321 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support in Xamarin.Android.Tools.AndroidSdk for enumerating AVD device profiles (hardware definitions) by running avdmanager list device, returning strongly-typed results for consumers (IDE extensions, GUI tools, CLIs).
Changes:
- Introduced
AvdDeviceProfilerecord model (Id,Name,Oem,Tag). - Added
AvdManagerRunner.ListDeviceProfilesAsync()plusParseDeviceListOutput()to parseavdmanager list deviceoutput. - Added unit tests for parsing behavior across multiple profiles, empty/header-only output, missing name fallback, and Windows newlines; updated PublicAPI unshipped entries for both TFMs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/AvdManagerRunnerTests.cs | Adds parsing-focused unit tests for device profile enumeration. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AvdManagerRunner.cs | Implements the new API to run avdmanager list device and parse results. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt | Declares the new public API surface for netstandard2.0. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt | Declares the new public API surface for net10.0. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AvdDeviceProfile.cs | Adds the new public model type representing a device profile. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a method to enumerate available AVD device profiles (hardware definitions) from \�vdmanager list device.
Changes
et10.0\ and
etstandard2.0\
Closes #321